<!-- 底部查看 -->

<template>
  <div>
    <BtnDel />

    <!-- <BtnPrimary v-if="one.status !== 2" :title="DICT.STATUS[0][2] || DICT.STATUS[0][1]" @click="toDeal(2)" /> -->

    <BtnDanger v-if="one.status !== 3" :title="DICT.STATUS[1][2] || DICT.STATUS[1][1]" @click="toDeal(3)" />

    <BtnWarning v-if="one.status !== 4" :title="DICT.STATUS[2][2] || DICT.STATUS[2][1]" @click="toDeal(4)" />

    <BtnInfo v-if="one.status !== 5" :title="DICT.STATUS[3][2] || DICT.STATUS[3][1]" @click="toDeal(5)" />

    <BtnDefault v-if="one.status !== 6" :title="DICT.STATUS[4][2] || DICT.STATUS[4][1]" @click="toDeal(6)" />
  </div>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'FooterShow',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixModal('deal', 'deal_')],

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: {
    /**
     * 点击处理
     */
    async toDeal(status) {
      const { DICT, one, deal_openEdit } = this

      deal_openEdit({
        ...one,
        TIP: CORE.dict(DICT.DEAL, status),
        assetId: [one.id],
        operateType: status,
        userName: CORE.USER.name,
      })
    },
  },
}
</script>
